<%@page import ="com.aptech.dto.User" %>
<%@page isELIgnored="false" %>
<%
    java.util.List l = new java.util.ArrayList();
    l.add("a");
    l.add("b");
    l.add("c");
    request.setAttribute("list", l);
%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String b = "bbbb";
    String[] a = {"a", "b"};
%>
<%!
    private String test() {
        return "a";
    }
%>
<c:forEach items="${list}" var="item">
    <c:out value="${item}" /><BR>
</c:forEach>

    <%--<%@include file="/testCookie.jsp" %>--%>

    <jsp:useBean id="user" scope="page" class="com.aptech.dto.User"/>
    <jsp:setProperty name="user" property="username"/>
    <jsp:setProperty name="user" property="test" value='<%=a%>'/>
    
    The user's name has been set value as <jsp:getProperty name="user" property="username"/><BR>
    The user'address has been set value as <jsp:getProperty name="user" property="address"/><BR>
    combined data: <%=user.combinedData()%><BR>
    Array: <%=user.getTest()[0]%>

    EL user:${paramValues[0]}

    <hr>
    <jsp:expression>
        b + "aaaa"
    </jsp:expression>
    <hr>
    <b> Session ID:</b> ${pageContext.session.id}
<hr>
<b>Header accept:</b> ${header.Accept}
<hr>
or
<hr>
${header["Accept"]}
<hr>
<b>header accept-encoding:</b> ${header["Accept-Encoding"]}
<hr>
<%
    response.addCookie(new Cookie("username", "xyz"));
%>
Cookie
${cookie["username"].value}
<hr>
<%
    request.setAttribute("name", "abcdef");
%>
request->name:${requestScope.name}
